package com.cn.service;

import com.cn.domain.Video;
import com.cn.service.fallback.VideoServiceFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author 伍崇武
 * @date 2021-10-05 0005 - 下午 5:21
 */
@FeignClient(value = "xdclass-video-service",fallback = VideoServiceFallBack.class)
public interface VideoService {

    @GetMapping("/api/v1/video/find_by_id")
    Video findById(@RequestParam("videoId") int videoId);

    @PostMapping("/api/v1/video/postTest")
    Object postTest(@RequestBody Video video);
}
